#include <stdio.h>

#define START_CHAR ' '
#define END_CHAR '~'
#define NUM_CHAR 95

int main()
{
    int c, i, j, nc[NUM_CHAR] = {};
    while ((c = getchar()) != EOF)
    {
        if (c >= START_CHAR && c <= END_CHAR)
            nc[c - START_CHAR]++;
    }

    for (i = 0; i < NUM_CHAR; i++)
    {
        if(nc[i])
        {
            putchar(START_CHAR + i);
            for(j = 0; j < nc[i]; j++)
            {
                putchar('#');
            }
            putchar('\n');
        }
    }
    return 0;
}